package test;

public class RuntimeConstantPoolOOM_2 {

    public static void main(String[] args) {
//        String str1 = new StringBuilder("计算机").append("软件").toString();
//        System.out.println(str1.intern() == str1);
//
//        String str2 = new StringBuilder("ja").append("va").toString();
//        System.out.println(str2.intern() == str2);
        String s = new String("abc");
        String s1 = s.intern();
        String s2 = "abc";
        System.out.println(s1 == s2);
    }
}
